<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<title><?php echo C('APP_NAME');?> | 编辑商品关联信息</title>
		<!-- Tell the browser to be responsive to screen width -->
		<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
		<!-- Bootstrap 3.3.6 -->
		<link rel="stylesheet" href="<?php echo H('assets/bootstrap/css/bootstrap.min.css');?>">
		<!-- Font Awesome -->
		<link rel="stylesheet" href="<?php echo H('assets/plugins/font-awesome/4.5.0/css/font-awesome.min.css');?>">
		<!-- Ionicons -->
		<link rel="stylesheet" href="<?php echo H('assets/plugins/ionicons/2.0.1/css/ionicons.min.css');?>">
		<!-- jQuery 2.2.0 -->
		<script src="<?php echo H('assets/plugins/jQuery/jQuery-2.2.0.min.js');?>"></script>
		<!-- Bootstrap 3.3.6 -->
		<script src="<?php echo H('assets/bootstrap/js/bootstrap.min.js');?>"></script>
		<!-- layer -->
		<script src="<?php echo H('assets/plugins/layer/layer.js');?>"></script>
		
		
		
		
		<!-- select2 -->
		<link rel="stylesheet" href="<?php echo H('assets/plugins/select2/select2.min.css');?>">
		<script src="<?php echo H('assets/plugins/select2/select2.full.min.js');?>"></script>
		<!-- previewThumb -->
		<script src="<?php echo H('assets/plugins/previewThumb/jQuery.previewThumb.js');?>"></script>
		<!-- Theme style -->
		<link rel="stylesheet" href="<?php echo H('assets/dist/css/AdminLTE.min.css');?>">
		<!-- AdminLTE Skins -->
		<link rel="stylesheet" href="<?php echo H('assets/dist/css/skins/_all-skins.min.css');?>">
		<!-- AdminLTE App -->
		<script src="<?php echo H('assets/dist/js/app.min.js');?>"></script>
		<script src="<?php echo H('assets/dist/js/admin.js');?>"></script>
	</head>
	<body class="hold-transition skin-blue sidebar-mini" style="background-color:#ecf0f5;">
		<section class="content">
		
		
<div class="box box-danger">
	<div class="box-header with-border">
		<h3 class="box-title">编辑商品关联信息</h3>
	</div>
	<?php if(!empty($data)): ?><form class="form-horizontal" action="<?php echo U('save');?>" method="post" rel-action="form" rel-success="reload()">
			<div class="box-body">
				<div class="form-group">
					<label class="col-sm-2 control-label"><span class="text-red">*</span>商品类型</label>
					<div class="col-sm-10">
						<input type="text" class="form-control" name="commodity_type" value="<?php echo ($data["commodity_commodity_type"]); ?>" placeholder="请输入商品类型"  autocomplete="off">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label"><span class="text-red">*</span>分期数</label>
					<div class="col-sm-10">
						<input type="text" class="form-control" name="stages_num" value="<?php echo ($data["commodity_stages_num"]); ?>" placeholder="请输入分期数"  autocomplete="off">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label"><span class="text-red">*</span>商品总金额</label>
					<div class="col-sm-10">
						<input type="text" class="form-control" name="total_money" value="<?php echo ($data["commodity_total_money"]); ?>" placeholder="请输入商品总金额"  autocomplete="off">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label"><span class="text-red">*</span>首付值</label>
					<div class="col-sm-10">
						<input type="text" class="form-control" name="down_payment" value="<?php echo ($data["commodity_down_payment"]); ?>" placeholder="请输入首付值"  autocomplete="off">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">商品直降金额</label>
					<div class="col-sm-10">
						<input type="text" class="form-control" name="reduce_price" value="<?php echo ($data["commodity_reduce_price"]); ?>" placeholder="请输入商品直降金额"  autocomplete="off">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">排序</label>
					<div class="col-sm-10">
						<input type="number" class="form-control" name="order" value="<?php echo ($data["commodity_order"]); ?>" placeholder="请填写整数，数字越小越靠前" autocomplete="off">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">状态</label>
					<div class="col-sm-10 radio">
						<label>
							<?php if($data["commodity_status"] == 'NORMAL'): ?><input type="radio" name="status" value="1" checked="checked">正常
							<?php else: ?>
								<input type="radio" name="status" value="1">正常<?php endif; ?>
						</label>
						<label>
							<?php if($data["commodity_status"] == 'DISABLE'): ?><input type="radio" name="status" value="0" checked="checked">锁定
							<?php else: ?>
								<input type="radio" name="status" value="0">锁定<?php endif; ?>
						</label>
					</div>
				</div>
			</div>
			<input type="hidden" name="id" value="<?php echo ($data["commodity_id"]); ?>">
			<div class="box-footer">
				<div class="col-sm-offset-2 col-sm-10">
					<button type="submit" class="btn btn-default">保存</button>
					<button type="button" class="btn btn-default" rel-action="dialog-close">关闭</button>
				</div>
			</div>
		</form><?php endif; ?>
	<?php if(empty($data)): ?><div class="box-body">
		<div class="alert alert-error alert-dismissible">
			<h4><i class="icon fa fa-warning"></i>暂无记录</h4>
			参数有误
		</div>
	</div><?php endif; ?>
</div>

		
		</section>
	</body>
</html>